from bs4 import BeautifulSoup
soup = BeautifulSoup(open("../素材/匹配天气.html",'r', encoding="utf-8"), "lxml")
all_data = []
tables = soup.select('.conMidtab > .conMidtab2 table')

for table in tables:
    trs = table.select('tr')[2:]
    for index, tr in enumerate(trs):
        td = tr.select('td')
        cityName = td[0].text
        cityTemp = td[3].text
        if index == 0:
            cityName = td[1].text
            cityTemp = td[4].text
        print(cityName, cityTemp)
